package com.gzc.just.play.last.war.sceneserver.attribute;

/**
 * 英雄属性类型枚举 - 定义所有可能的英雄属性
 *
 * 对应C++的 SSGUParameterMgr 参数类型
 *
 * @author AI编程助手
 * @version 1.0
 * @since 2025-11-22
 */
public enum AttributeType {
    // 基础属性
    LEVEL("等级", "level", true),
    EXPERIENCE("经验", "experience", false),
    
    // 生命相关
    MAX_HEALTH("最大生命值", "maxHealth", true),
    CURRENT_HEALTH("当前生命值", "currentHealth", false),
    HEALTH_RECOVER_RATE("生命恢复速率", "healthRecoverRate", true),
    HEALTH_RECOVER_DELAY("生命恢复延迟", "healthRecoverDelay", true),
    
    // 魔力相关
    MAX_MANA("最大魔力", "maxMana", true),
    CURRENT_MANA("当前魔力", "currentMana", false),
    MANA_RECOVER_RATE("魔力恢复速率", "manaRecoverRate", true),
    MANA_RECOVER_DELAY("魔力恢复延迟", "manaRecoverDelay", true),
    
    // 攻防速
    ATTACK("攻击力", "attack", true),
    DEFENSE("防御力", "defense", true),
    SPEED("移动速度", "speed", true),
    
    // 战斗属性
    CRITICAL_RATE("暴击率", "criticalRate", true),
    CRITICAL_DAMAGE("暴击伤害倍率", "criticalDamage", true),
    DODGE_RATE("躲避率", "dodgeRate", true),
    DAMAGE_REDUCE_RATE("伤害减免率", "damageReduceRate", true),
    
    // 资源
    GOLD("金币", "gold", false),
    GEMS("宝石", "gems", false),
    
    // 战斗统计
    TOTAL_KILLS("总击杀数", "totalKills", false),
    TOTAL_DEATHS("总死亡数", "totalDeaths", false),
    TOTAL_ASSISTS("总助攻数", "totalAssists", false),
    CURRENT_KILL_STREAK("当前连杀数", "currentKillStreak", false),
    
    // 其他属性
    ARMOR_PENETRATION("护甲穿透", "armorPenetration", true),
    LIFE_STEAL_RATE("吸血率", "lifeStealRate", true),
    TENACITY("坚韧度", "tenacity", true);
    
    private final String displayName;
    private final String propertyName;
    private final boolean affectedByBuff;
    
    AttributeType(String displayName, String propertyName, boolean affectedByBuff) {
        this.displayName = displayName;
        this.propertyName = propertyName;
        this.affectedByBuff = affectedByBuff;
    }
    
    public String getDisplayName() {
        return displayName;
    }
    
    public String getPropertyName() {
        return propertyName;
    }
    
    public boolean isAffectedByBuff() {
        return affectedByBuff;
    }
    
    /**
     * 根据属性名称获取对应的属性类型
     *
     * @param propertyName 属性名称
     * @return 对应的属性类型，未找到返回null
     */
    public static AttributeType getByPropertyName(String propertyName) {
        for (AttributeType type : AttributeType.values()) {
            if (type.propertyName.equals(propertyName)) {
                return type;
            }
        }
        return null;
    }
}
